package com.zhaoyu.admin.controller;

import com.zhaoyu.admin.service.AdUserService;
import com.zhaoyu.apis.admin.AdUserControllerApis;
import com.zhaoyu.model.admin.dtos.AdUserDto;
import com.zhaoyu.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
public class AdUserController implements AdUserControllerApis {

    @Autowired
    private AdUserService adLoginService;

    @Override
    @PostMapping("/in") // json格式的数据
    public ResponseResult loginAdUser(@RequestBody AdUserDto adUserDto) {
        return adLoginService.login(adUserDto);
    }

}